<div class="panel-default">
  <table lay-filter="demo" lay-size='lg'>
    <thead>
      <tr>

        <th lay-data="{field:'thumbnail_img'}"><%= Article.human_attribute_name(:thumbnail_img) %></th>

        <th lay-data="{field:'title'}"><%= Article.human_attribute_name(:title) %></th>

        <th lay-data="{field:'content'}"><%= Article.human_attribute_name(:content) %></th>

        <th lay-data="{field:'tags'}"><%= Article.human_attribute_name(:tags) %></th>

        <th lay-data="{field:'article_category_id'}"><%= Article.human_attribute_name(:article_category_id) %></th>

        <th lay-data="{field:'operation',width:200}"></th>
      </tr>
    </thead>

    <tbody>
      <% @articles.each do |article| %>
        <tr>

          <td><%= article.thumbnail_img %></td>

          <td><%= article.title %></td>

          <td><%= article.content %></td>

          <td><%= article.tags %></td>

          <td><%= article.article_category.title %></td>

          <td>
            <%= link_to [:admin, article], class: "label label-primary" do -%><i class="iconfont icon-chakan"></i>查看<% end %>
            <%= link_to edit_admin_article_path(article), class: "label" do -%><i class="iconfont icon-bianji"></i>编辑<% end %>
            <%= link_to [:admin, article], method: :delete, data: { confirm: '确定删除吗? 注意此操作无法撤销！' }, class: "label label-danger" do -%><i class="iconfont icon-shanchu"></i>删除<% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
  <%= link_to new_admin_article_path do -%><button type="button" class="layui-btn"><i class="layui-icon">&#xe608;</i> <%= t('actions.new') + Article.model_name.human %></button><% end %>
</div>



